package com.zmj.mobile.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;


@Getter
@AllArgsConstructor
public enum FlowTypeEnum {
    //0：用章 1：研发试制 2：采购询比价"
    //用章申请： YZSQ
    //采购询比价定价: CGXBJDJ
    //研发试制采购申请: YFSZCGSQ
    SEAL_APPLY(0, "YZSQ", "用章申请"),
    TECH_PUR_MAIN(1, "YFSZCGSQ", "研发试制采购申请"),
    QUOTE_ITEM_MAIN(2, "CGXBJDJ", "采购询比价定价");

    private final Integer value;
    private final String key;
    private final String label;

    public static boolean contains(Integer value) {
        if (value == null) {
            return false;
        }
        for (FlowTypeEnum example : values()) {
            if (example.getValue().equals(value)) {
                return true;
            }
        }
        return false;
    }

    public static FlowTypeEnum getExample(Integer value) {
        if (value == null) {
            return null;
        }
        for (FlowTypeEnum example : values()) {
            if (example.getValue().equals(value)) {
                return example;
            }
        }
        return null;
    }
}
